import unittest
import HTMLTestRunner

dir = "./"
suite = unittest.TestLoader().discover(dir, "test_*.py")

if __name__ == "__main__":
    fp = open('./result.html', 'wb')
    runner = HTMLTestRunner.HTMLTestRunner(
        stream=fp,
        title="HTMLTestRunner example",
        description="作业"
    )
    runner.run(suite)
    fp.close()
